<% empty? = @article == nil %>
<%= unless empty? do %>
  <% col_size = if @single, do: 12, else: 6 %>
  <div class="column is-<%= col_size %> cm-article">
      <div class="columns is-vcentered is-mobile">
        <div class="column is-narrow is-paddingless cm-article-face">
          <%= live_link to: Routes.live_path(@socket, CommunityWeb.UserLive, Enum.random(1..3)) do %>
            <img src="/images/face/<%= @article[:face] %>">
          <% end %>
        </div>
        <div class="column"
             style="white-space: nowrap; text-overflow: hidden; overflow: hidden;"
        >
          <%= live_link @article[:title], 
              class: "cm-article-title", 
              to: Routes.live_path(@socket, CommunityWeb.ArticleLive, 10001)
          %>
          <div class="cm-article-info">
            <%= live_link @article[:author], 
                to: Routes.live_path(@socket, CommunityWeb.UserLive, Enum.random(1..3))
            %>
            • 最后由
            <%= live_link @article[:reply_author], 
                to: Routes.live_path(@socket, CommunityWeb.UserLive, Enum.random(1..3))
            %>
            回复于 <%= @article[:reply_at] %> 天前
          </div>
        </div>
        <div class="column is-narrow has-text-centered cm-article-rm">
          <span>
            <%= @article[:reply_num] %>
          </span>
        </div>
      </div>
  </div>
<% end %>
